% fields E for rho > a

function [rho, phi, z] = func_E_outside(r, m, CONSTS)

    k0    = CONSTS.k0;
    a     = CONSTS.a;
    eps_a = CONSTS.eps_a;
    
    E0=1;
    
    [coef, p1] = func_coef_of_fields(m, CONSTS);
    
    if (isnan(p1))
        rho = 0;
        phi = 0;
        z   = 0;
        return;
    end

    
    C1 = coef(3);
    C2 = coef(4);

    s      = func_s(p1, CONSTS);

    S = k0*a*s;
    besselK_m = besselk(m, S*r);
    besselK_mp1 = besselk(m+1, S*r);

    rho = -C1*(p1/eps_a)*(besselK_mp1 - (m./(S*r)).*besselK_m) + ...
                     C2*(m./(S*r)).* besselK_m;
    
    phi = E0*(-1i*C1*(p1/eps_a)*(m./(S*r)).*besselK_m + ...
                     1i*C2*(besselK_mp1 - (m./(S*r)).*besselK_m));
    
    z   = -(1i/eps_a)*C1*s*besselK_m;
    
end